/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package model;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;

/**
 *
 * @author Ekaterina
 */
@Entity
@Table (name = "vacation", catalog = "otdelkadrov", schema = "")
public class Vacation implements Serializable {

    @Column(name = "vid")
private String vid; 
    
    @Column(name = "startt")
    @Temporal(javax.persistence.TemporalType.TIMESTAMP)
private Date startt;
    
    @Column(name = "endd")
    @Temporal(javax.persistence.TemporalType.TIMESTAMP)
private Date endd;
    
    @Column(name = "prikaz")
private String prikaz;
    
     @Column(name = "periodd")
private String periodd;
    
    @Id
@GeneratedValue
@Column (name="id")
private Integer id = null;
    
    @ManyToOne
    @JoinColumn(name = "worker",referencedColumnName = "id")
    private Worker worker;

    public String getVid() {
        return vid;
    }

    public Date getStart() {
        return startt;
    }

    public Date getEnd() {
        return endd;
    }

    public String getPrikaz() {
        return prikaz;
    }
    
        public String getPeriod() {
        return periodd;
    }

    public Integer getId() {
        return id;
    }

    public Worker getWorker() {
        return worker;
    }

    public void setVid(String vid) {
        this.vid = vid;
    }

    public void setStart(Date start) {
        this.startt = start;
    }

    public void setEnd(Date end) {
        this.endd = end;
    }

    public void setPrikaz(String prikaz) {
        this.prikaz = prikaz;
    }
    
        public void setPeriod(String periodd) {
        this.periodd = periodd;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public void setWorker(Worker worker) {
        this.worker = worker;
    }
   
}